<script type="text/javascript">
var cats = <%= @cats%>;
var dftCat1 = <%= @params[:cat1_id].blank? ? 0 : @params[:cat1_id]%>;
var dftCat2 = <%= @params[:cat2_id].blank? ? 0 : @params[:cat2_id]%>;
var dftCat3 = <%= @params[:cat3_id].blank? ? 0 : @params[:cat3_id]%>;
</script>
<%=javascript_include_tag 'items/cat.list.admin' %>
<div id="main">
  <%form_tag admin_shops_path,:method => :get do%>
    <div class="box">
      <table id="search" class="table border">
        <tr>
				<td valign="top" nowrap="nowrap" class="ws20" id="cat1_list"><strong>一级</strong>：<%=hidden_field_tag :cat1_id%></td>
			</tr>
			<tr class="tr2">
				<td class="ws20" id="cat2_list"><strong>二级</strong>：<%=hidden_field_tag :cat2_id%></td>
			</tr>
			<tr>
				<td class="ws20" id="cat3_list"><strong>三级</strong>：<%=hidden_field_tag :cat3_id%></td>
			</tr>
        <tr class="tr2">
          <td colspan="2"><label>编号/名称：
              <input name="shop_id" type="text" value="<%=@params[:shop_id]%>" />
            </label>
            &nbsp;　&nbsp;
            <label>供应商：
              <input name="" type="text" value="" />
              <a href="#"><img class="bttsearch" src="../images/b.gif" /></a> </label>
            &nbsp;　&nbsp;
            <label>品牌：
              <input name="brand" type="text" value="" />
              <a href="#"><img class="bttsearch" src="../images/b.gif" /></a> </label>
            &nbsp;　&nbsp;
            <input class="submit btt90" type="submit" value="查询" /></td>
        </tr>
      </table>
    </div>
  <% end %>
  <div class="clearfix mb10"><a class="btt btt90 bttb" href="#">上架</a> <a class="btt bttg btt90" href="#">下架</a> <a class="btt btt90 bttr" href="#">删除</a></div>
  <div class="box">
    <form id="form1" name="form1" method="post" action="">
      <table class="table border">
        <tr>
          <th width="1"> <label>
              <input type="checkbox" name="checkbox" id="checkbox" />
            </label>
          </th>
          <th width="1">&nbsp;</th>
          <th>ID</th>
          <th>分类</th>
          <th>掌柜</th>
          <th>名称</th>
          <th>佣金比率</th>
          <th>级别</th>
          <th>创建</th>
        </tr>
        <%@shops.each do |shop|%>
        <tr class="<%= cycle('', 'tr2') %>">
          <td><input type="checkbox" name="checkbox" id="checkbox" /></td>
          <td></td>
          <td><%=shop.id%></td>
          <td>女装</td>
          <td>&nbsp;</td>          
          <td><a href="<%=shop.click_url%>" target="_blank"><%=shop.shop_title%></td>
          <td><%=shop.commission_rate%></td>
          <td>shop.created_at</td>
        </tr>
        <% end %>
      </table>
    </form>
  </div>
  <div class="page">
    <div  class="fr"><a href="#" class="btt">首页</a> <a href="#" class="btt bttb">上一页 &lt;</a> <a href="#" class="btt">4</a> <a href="#" class="btt">5</a> <a href="#" class="btt">6</a> <a href="#" class="btt bttb">&gt; 下一页</a> <a href="#" class="btt">尾页</a></div>
   </div>
  </div>
